package com.example.service;

import com.example.entity.Question;
import com.example.mapper.QuestionMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class QuestionService {
    @Resource
    private QuestionMapper questionMapper;

    public int addQuestion(Question question) {
        return questionMapper.insert(question);
    }

    public int updateById(Question question) {
        return questionMapper.updateById(question);
    }
    public int deleteById(Long id) {
        return questionMapper.deleteById(id);
    }
    public List<Question> selectAll(String keyword) {
        return questionMapper.selectAll(keyword);
    }
}
